-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `filemanager`
--

-- --------------------------------------------------------

--
-- Table structure for table `documents`
--

CREATE TABLE `documents` (
  `doc_id` int(10) NOT NULL,
  `doc_user` int(10) NOT NULL,
  `doc_name` varchar(255) NOT NULL,
  `doc_folder` int(10) NOT NULL,
  `doc_desc` text NOT NULL,
  `doc_path` varchar(255) NOT NULL,
  `doc_size` varchar(255) NOT NULL,
  `doc_date` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `folders`
--

CREATE TABLE `folders` (
  `folder_id` int(10) NOT NULL,
  `folder_user` int(10) NOT NULL,
  `folder_name` varchar(255) NOT NULL,
  `folder_lock` int(10) NOT NULL,
  `folder_date` date NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `friends`
--

CREATE TABLE `friends` (
  `frd_id` int(10) NOT NULL,
  `frd_user` int(10) NOT NULL,
  `frd_friend` int(10) NOT NULL,
  `frd_date` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `friend_requests`
--

CREATE TABLE `friend_requests` (
  `fr_id` int(10) NOT NULL,
  `fr_from` int(10) NOT NULL,
  `fr_to` int(10) NOT NULL,
  `fr_status` int(10) NOT NULL,
  `fr_date` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sharefolder`
--

CREATE TABLE `sharefolder` (
  `sf_id` int(10) NOT NULL,
  `sf_user` int(10) NOT NULL,
  `sf_name` varchar(255) NOT NULL,
  `sf_date` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sharefolder_documents`
--

CREATE TABLE `sharefolder_documents` (
  `sfdoc_id` int(10) NOT NULL,
  `sfdoc_user` int(10) NOT NULL,
  `sfdoc_sfid` int(10) NOT NULL,
  `sfdoc_docid` int(10) NOT NULL,
  `sfdoc_date` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sharefolder_members`
--

CREATE TABLE `sharefolder_members` (
  `member_id` int(10) NOT NULL,
  `member_sf` int(10) NOT NULL,
  `member_userid` int(10) NOT NULL,
  `member_added` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `documents`
--
ALTER TABLE `documents`
  ADD PRIMARY KEY (`doc_id`);

--
-- Indexes for table `folders`
--
ALTER TABLE `folders`
  ADD PRIMARY KEY (`folder_id`);

--
-- Indexes for table `friends`
--
ALTER TABLE `friends`
  ADD PRIMARY KEY (`frd_id`);

--
-- Indexes for table `friend_requests`
--
ALTER TABLE `friend_requests`
  ADD PRIMARY KEY (`fr_id`);

--
-- Indexes for table `sharefolder`
--
ALTER TABLE `sharefolder`
  ADD PRIMARY KEY (`sf_id`);

--
-- Indexes for table `sharefolder_documents`
--
ALTER TABLE `sharefolder_documents`
  ADD PRIMARY KEY (`sfdoc_id`);

--
-- Indexes for table `sharefolder_members`
--
ALTER TABLE `sharefolder_members`
  ADD PRIMARY KEY (`member_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `documents`
--
ALTER TABLE `documents`
  MODIFY `doc_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=55;

--
-- AUTO_INCREMENT for table `folders`
--
ALTER TABLE `folders`
  MODIFY `folder_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=64;

--
-- AUTO_INCREMENT for table `friends`
--
ALTER TABLE `friends`
  MODIFY `frd_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;

--
-- AUTO_INCREMENT for table `friend_requests`
--
ALTER TABLE `friend_requests`
  MODIFY `fr_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=68;

--
-- AUTO_INCREMENT for table `sharefolder`
--
ALTER TABLE `sharefolder`
  MODIFY `sf_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

--
-- AUTO_INCREMENT for table `sharefolder_documents`
--
ALTER TABLE `sharefolder_documents`
  MODIFY `sfdoc_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT for table `sharefolder_members`
--
ALTER TABLE `sharefolder_members`
  MODIFY `member_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
COMMIT;

